package com.inspur.icity.bus.api.user.service;

import com.inspur.icity.bus.api.user.model.BusRouteHistory;
import com.inspur.icity.bus.api.user.repo.BusRouteHistoryDao;
import com.inspur.icity.bus.base.core.service.CrudService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Created By Kinsey
 * Date: 2018/1/9
 * Time: 11:27
 */
@Service
public class BusRouteHistoryService extends CrudService<BusRouteHistoryDao, BusRouteHistory, Integer> {

    /**
     * 查询用户常用路线
     * @param mobile
     * @return
     */
    public List<BusRouteHistory> getBusRouteHistoryList(String mobile,String areacode){
        return curdRepo.getBusRouteHistoryList(mobile,areacode);
    }

    /**
     * 清空常用路线
     * @param mobile
     */
    public void cleanBusRouteHistory(String mobile,String areacode){
        curdRepo.cleanBusRouteHistory(mobile,areacode);
    }
}
